# Maintainer: Antonio Rojas <arojas@archlinux.org>
# Contributor: Guillaume Horel <guillaume.horel@gmail.com>

pkgname=ecos
pkgver=2.0.10
pkgrel=2
pkgdesc='A lightweight conic solver for second-order cone programming'
url='https://github.com/embotech/ecos/wiki'
license=(GPL3)
arch=(loong64 x86_64)
depends=(glibc)
makedepends=(cmake)
source=(https://github.com/embotech/ecos/archive/v$pkgver/$pkgname-$pkgver.tar.gz)
sha256sums=('1aa24b5782b84fa33df2987510fb8f60f5f999cc2d3a5c73cfc3eb5e5f3b46af')

build() {
  cmake -B build -S $pkgname-$pkgver \
    -DCMAKE_INSTALL_PREFIX="/usr"
  cmake --build build
}

package() {
  DESTDIR="$pkgdir" cmake --install build
}
